ACPI/table: Always count matched and successfully parsed entries
authorTomasz Nowicki <tomasz.nowicki@linaro.org>
Wed, 9 Sep 2015 14:25:42 +0000 (16:25 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 9 Sep 2015 14:25:42 +0000 (16:25 +0200)
commitcf5efd610fe58160ceba3b5daece79c6a245c8fc
tree72c94f9f43a7451033be692fb6a21472cdb1beba
parent0b5fd6433f54281f3bffd79f2d759dd0edc1f3ab
ACPI/table: Always count matched and successfully parsed entries

acpi_parse_entries() allows to traverse all available table entries (aka
subtables) by passing max_entries parameter equal to 0, but since its count
variable is only incremented if max_entries is not 0, the function always
returns 0 for max_entries equal to 0.  It would be more useful if it returned
the number of entries matched instead, so make it increment count in that
case too.

Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
[Linux commit 4ceacd02f5a1795c5c697e0345ee10beef675290]
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
xen/drivers/acpi/tables.c